import axios from '../../utils/axios'

// 班级列表
export const teachClassesList = (params?: { page: Number }, method?: string) => {
    return axios({
        url: '/teach/classes/list',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 班级成员
export const teachClassesMember = (params?: { page: Number, id: Number }, method?: string) => {
    return axios({
        url: '/teach/classes/member',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 会员用户
export const teachClassesUser = (params?: { page: Number, id: Number }, method?: string) => {
    return axios({
        url: '/teach/classes/user',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 添加用户到班级
export const teachClassesCreate = (params?: {}, method?: string) => {
    return axios({
        url: '/teach/classes/create',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 编辑用户到班级
export const teachClassesupdate = (params?: {}, method?: string) => {
    return axios({
        url: '/teach/classes/update',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 删除学生
export const teachClassesDeleted = (params?: {}, method?: string) => {
    return axios({
        url: '/teach/classes/deleted',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 上课记录
export const classesRecordList = (params?: {}, method?: string) => {
    return axios({
        url: '/teach/classes/record/list',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 班级下拉列表
export const classesSelect = (params?: {}, method?: string) => {
    return axios({
        url: '/teach/classes/select',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 批量导入学生
export const classesImport = (params?: {}, method?: string) => {
    return axios({
        url: '/teach/classes/import',
        method: method || 'get',
        headers: {
            'Content-Type': 'multipart/form-data' // 设置适当的 Content-Type
        },
        data: params
    })
}

// 搜索
export const classesSearch = (params?: {}, method?: string) => {
    return axios({
        url: '/teach/classes/search',
        method: method || 'get',
        data: params
    })
}

// 添加到班级
export const classesMemberCreate = (params?: {}, method?: string) => {
    return axios({
        url: '/teach/classes/member/crate',
        method: method || 'get',
        data: params
    })
}
